﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Default.master" CodeFile="DatabaseProperties.aspx.cs" Inherits="DatabaseProperties"  Title="<%$Resources:web.sitemap, DatabaseProperties.Title %>"%>
<%@ Register TagPrefix="Toolbar" TagName="HelpLogout" Src="~/Toolbars/HelpLogoutToolbar.ascx" %>
<%@ Register TagPrefix="Location" TagName="Database" Src="~/Toolbars/DatabaseLocation.ascx" %>
<%@ Register TagPrefix="Location" TagName="Server" Src="~/Toolbars/ServerLocation.ascx" %>
<%@ Register tagPrefix="web" Assembly="WebChart" Namespace="WebChart" %>
<asp:Content runat="Server" ContentPlaceHolderID="defaultScript">
	<script language="javascript">
	    function chkDataFileAutoGrowFile_onclick(chk)
	    {
		    if (chk.checked == false)
		    {
			    document.all["txtDataFileGrowth"].value = ''
			    document.all["txtDataFileMaxFileSize"].value = ''
    			
			    document.all["ddlDataFileGrowthType"].disabled = true;
			    document.all["panDataFile"].disabled = true;
		    }
		    else
		    {
			    document.all["panDataFile"].disabled = false;
			    document.all["ddlDataFileGrowthType"].disabled = false;
    			
			    if (document.all["txtDataFileGrowth"].value == '')
			    {
				    document.all["txtDataFileGrowth"].value = '1024'
				    document.all["optDataFileUnrestrictedGrowth"].checked = true
			    }
		    }
	    }		

	    function chkLogFileAutoGrowFile_onclick(chk)
	    {
		    if (chk.checked == false)
		    {
			    document.all["txtLogFileGrowth"].value = ''
			    document.all["txtLogFileMaxFileSize"].value = ''
    			
			    document.all["ddlLogFileGrowthType"].disabled = true;
			    document.all["panLogFile"].disabled = true;
		    }
		    else
		    {
			    document.all["panLogFile"].disabled = false;
			    document.all["ddlLogFileGrowthType"].disabled = false;
    			
			    if (document.all["txtLogFileGrowth"].value == '')
			    {
				    document.all["txtLogFileGrowth"].value = '10'
				    document.all["ddlLogFileGrowthType"].selectedIndex = 1
				    document.all["optLogFileRestrictGrowth"].checked = true
				    document.all["txtLogFileMaxFileSize"].value = '2147483648'
			    }
		    }
	    }		
    </script>
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="breadcrumb">
    <Location:Server Runat="Server" id="ServerLocation"></Location:Server>
    <Location:Database Runat="Server" id="DatabaseLocation" IsActive="true"></Location:Database>
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="NavigationPane">

</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="ContentPane">
    <div class="RightCenterWell">
        <table width="100%">
            <tr>
                <td valign="top" width="1%">
                    <asp:Image ID="icon_databases_32" SkinID="icon_databases_32" runat="Server" />
                </td>
                <td> 
                    <span class="header3"><asp:label id="lblNameProperty" Runat="server"></asp:label>: <asp:Literal Text="<%$Resources: LocalizedText,DatabaseProperties_Title %>" runat="server" /></span><br />
                    <hr />
                    <table width="100%" border="0" cellpadding="2">
                        <tr>
                            <td width="50%" valign="top">
                                <span class="header4">General</span><br />
                                <table width="100%" class="PropertyTable" cellpadding="15">
                                    <tr>
                                        <td>
                                           <asp:Literal ID="Literal1" Text="<%$Resources: LocalizedText,DatabaseProperties_DatabaseCreated %>" runat="server" />
                                        </td>
                                        <td>
                                            <asp:label id="lblDateCreatedProperty" Runat="server"></asp:label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Literal ID="Literal2" Text="<%$Resources: LocalizedText,DatabaseProperties_DatabaseStatus %>" runat="server" />
                                        </td>
                                        <td>
                                            <asp:label id="lblStatusProperty" Runat="server"></asp:label>
                                        </td>                                        
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Literal ID="Literal3" Text="<%$Resources:LocalizedText,DatabaseProperties_DatabaseActiveConnections %>" runat="server" />
                                        </td>
                                        <td>
                                            <asp:label id="lblNumberOfUsersProperty" Runat="server"></asp:label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                             <asp:Literal ID="Literal4" Text="<%$Resources:LocalizedText,DatabaseProperties_DatabaseDateOfLastBackup %>" runat="server" />
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                             <asp:Literal ID="Literal5" Text="<%$Resources:LocalizedText,DatabaseProperties_DatabaseData %>" runat="server" />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblLastDataBackup" runat="Server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                             <asp:Literal ID="Literal6" Text="<%$Resources:LocalizedText,DatabaseProperties_DatabaseTransactionLog %>" runat="server" />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblLastTransactionBackup" runat="Server"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="50%" valign="top">
                                <span class="header4"> <asp:Literal ID="Literal7" Text="<%$Resources:LocalizedText,DatabaseProperties_DatabaseSpace %>" runat="server" /></span><br />
                                <web:chartcontrol id="chartcontrol1" runat="server" Background-Type="solid" Legend-Position="Right"  Background-Color="White" GridLines="None" HasChartLegend="True" TopPadding="20" ChartPadding="0">
                                    <Charts>
                                        <web:PieChart>
                                        </web:PieChart>
                                    </Charts>
                                 </web:chartcontrol>
                            </td>
                        </tr>
                    </table>
                    <br />
                    <br />
                    <table width="100%">
                        <tr>
                            <td>
                                <p>
                                    <hr />
                                    <span class="header4"><asp:Literal ID="Literal8" Text="<%$Resources:LocalizedText,DatabaseProperties_EditProperties %>" runat="server" /></span><br />
                                    <br />
					                <table cellSpacing="0" cellPadding="0" border="0">
						                <tr>
							                <td>

								                <table cellSpacing="0" cellPadding="0" width="100%" border="0">
									                <TR>
										                <TD height="2"><div class="header4"><asp:Literal ID="Literal9" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFiles %>" runat="server" /></div></TD>
									                </TR>
									                <TR>
										                <TD class="databaseListItem" bgColor="white">
											                <table width="100%">
											                    <tr>
											                        <td valign="top" align="right">
											                            <asp:CheckBox Runat="server" ID="chkDataFileAutoGrowFile"></asp:CheckBox>
											                        </td>
											                        <td>
											                            <asp:Panel id="panDataFile" runat="server" BorderWidth="0">
											                                <span class="normalText"><asp:Literal ID="Literal10" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFileFileGrowthSize %>" runat="server" /></span><br />
												                            <asp:TextBox id="txtDataFileGrowth" Runat="server" Columns="4" Width="80px" MaxLength="10"></asp:TextBox>
												                            &nbsp; 
												                            <asp:DropDownList id="ddlDataFileGrowthType" Runat="server">
													                            <asp:ListItem Value="0" Text="KB"></asp:ListItem>
													                            <asp:ListItem Value="1" Text="Percent"></asp:ListItem>
												                            </asp:DropDownList><br />
												                            &nbsp;<br />
												                            <span class="normalText"><asp:Literal ID="Literal11" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFileMaximumFileSize %>" runat="server" /></span><br />
												                            <asp:RadioButton id="optDataFileUnrestrictedGrowth" Runat="server" GroupName="DataFileMaximumFileSizeType" Checked="True" />&nbsp;<span class="normalText"><asp:Literal ID="Literal12" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFileGrowthUnrestrict %>" runat="server" /></span><br />
												                            <asp:RadioButton id="optDataFileRestrictGrowth" Runat="server" GroupName="DataFileMaximumFileSizeType" />&nbsp;<span class="normalText"><asp:Literal ID="Literal13" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFileGrowthRestrict %>" runat="server" /></span><br />
												                            <asp:TextBox id="txtDataFileMaxFileSize" Runat="server" Columns="4" Width="80px" MaxLength="10"></asp:TextBox>&nbsp;&nbsp;<span class="normalText"><asp:Literal ID="Literal14" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFileKB %>" runat="server" /></span>
											                            </asp:Panel>
											                        </td>
											                    </tr>
											                </table>
										                </TD>
									                </TR>
								                </table>

							                </td>
							                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
							                <td align="top">

								                <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
									                <TR>
										                <TD height="2"><br /><div class="header4"><asp:Literal ID="Literal15" Text="<%$Resources:LocalizedText,DatabaseProperties_DatabaseTransactionLog %>" runat="server" /></div></TD>
									                </TR>
									                <TR>
										                <TD class="databaseListItem" bgColor="white">
										                    <table width="100%">
										                        <tr>
										                            <td valign="top" align="right">
										                                <asp:CheckBox Runat="server" ID="chkLogFileAutoGrowFile"></asp:CheckBox>
										                            </td>
										                            <td>
											                            <asp:Panel id="panLogFile" runat="server" BorderWidth="0">
											                                <span class="normalText"><asp:Literal ID="Literal16" Text="<%$Resources:LocalizedText,DatabaseProperties_TranLogFileGrowthSize %>" runat="server" /></span><br />
												                            <asp:TextBox id="txtLogFileGrowth" Runat="server" Columns="4" Width="80px" MaxLength="10"></asp:TextBox>&nbsp; 
												                            <asp:DropDownList id="ddlLogFileGrowthType" Runat="server">
													                            <asp:ListItem Value="0" Text="KB"></asp:ListItem>
													                            <asp:ListItem Value="1" Text="Percent"></asp:ListItem>
												                            </asp:DropDownList><BR>
												                            &nbsp;<BR>
												                            <span class="normalText"><asp:Literal ID="Literal17" Text="<%$Resources:LocalizedText,DatabaseProperties_TranLogMaximumFileSize %>" runat="server" /></span><BR>
												                            <asp:RadioButton id="optLogFileUnrestrictedGrowth" Runat="server" GroupName="LogFileMaximumFileSizeType" Checked="True" />&nbsp;<span class="normalText"><asp:Literal ID="Literal18" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFileGrowthUnrestrict %>" runat="server" /></span><br />
												                            <asp:RadioButton id="optLogFileRestrictGrowth" Runat="server" GroupName="LogFileMaximumFileSizeType" />&nbsp;<span class="normalText"><asp:Literal ID="Literal19" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFileGrowthRestrict %>" runat="server" /></span><br />
												                            <asp:TextBox id="txtLogFileMaxFileSize" Runat="server" Columns="4" Width="80px" MaxLength="10"></asp:TextBox>&nbsp;&nbsp;<span class="normalText"><asp:Literal ID="Literal20" Text="<%$Resources:LocalizedText,DatabaseProperties_DataFileKB %>" runat="server" /></span></asp:Panel>
										                            </td>
										                        </tr>
										                    </table>
											                
											                <br>
										                </TD>
									                </TR>
								                </TABLE>

							                </td>
						                </tr>
					                </table>
                                </p>
                            </td>
                        </tr>
                    </table>
                    <br>
					<asp:button id="cmdApply" CSSClass="button" OnClick="cmdApply_Click" onMouseOver="this.style.color='#cc0033';" onMouseOut="this.style.color='#000000';" runat="server" Text="<%$Resources:LocalizedText,DatabaseProperties_ApplyButtonText %>"></asp:button>&nbsp;&nbsp;&nbsp;<asp:Label id="lblError" runat="server" ForeColor="red" Visible="False"></asp:Label>
                </td>
            </tr>
        </table>
    </div>



</asp:Content>
